Move repo to use a Makefile#169
Merged
joncinque merged 3 commits intosolana-program:mainfrom Oct 24, 2025
Merged
Conversation
#### Problem The libraries repo has a lot of packages to run CI and commands against, and contains a pretty long list of commands in package.json, so it's a great candidate for moving to a Makefile. #### Summary of changes This is pretty similar to the others, except that I removed the "first word before - means directory" and instead flatten everything at the top-level.
rustopian
suggested changes
Oct 24, 2025
Makefile
Outdated
Comment on lines
74
to
81
| format-check-js-%: | ||
| cd $(call make-path,$*) && pnpm install && pnpm format $(ARGS) | ||
|
|
||
| lint-js-%: | ||
| cd $(call make-path,$*) && pnpm install && pnpm lint $(ARGS) | ||
|
|
||
| test-js-%: | ||
| cd $(call make-path,$*) && pnpm install && pnpm build && pnpm test $(ARGS) |
There was a problem hiding this comment.
nit: what do you think about lockfile strictness for pnpm installs?
Suggested change
| format-check-js-%: | |
| cd $(call make-path,$*) && pnpm install && pnpm format $(ARGS) | |
| lint-js-%: | |
| cd $(call make-path,$*) && pnpm install && pnpm lint $(ARGS) | |
| test-js-%: | |
| cd $(call make-path,$*) && pnpm install && pnpm build && pnpm test $(ARGS) | |
| format-check-js-%: | |
| cd $(call make-path,$*) && pnpm install --frozen-lockfile && pnpm format $(ARGS) | |
| lint-js-%: | |
| cd $(call make-path,$*) && pnpm install --frozen-lockfile && pnpm lint $(ARGS) | |
| test-js-%: | |
| cd $(call make-path,$*) && pnpm install --frozen-lockfile && pnpm build && pnpm test $(ARGS) |
Makefile
Outdated
Comment on lines
95
to
96
| publish-js-%: | ||
| cd "$(call make-path,$*)" && pnpm install && pnpm version $(LEVEL) --no-git-tag-version $(call preid-arg,$(LEVEL),$(TAG)) && pnpm publish --no-git-checks --tag $(TAG) |
There was a problem hiding this comment.
Same
Suggested change
| publish-js-%: | |
| cd "$(call make-path,$*)" && pnpm install && pnpm version $(LEVEL) --no-git-tag-version $(call preid-arg,$(LEVEL),$(TAG)) && pnpm publish --no-git-checks --tag $(TAG) | |
| publish-js-%: | |
| cd "$(call make-path,$*)" && pnpm install --frozen-lockfile && pnpm version $(LEVEL) --no-git-tag-version $(call preid-arg,$(LEVEL),$(TAG)) && pnpm publish --no-git-checks --tag $(TAG) |
Makefile
Outdated
Comment on lines
74
to
80
| format-check-js-%: | ||
| cd $(call make-path,$*) && pnpm install && pnpm format $(ARGS) | ||
|
|
||
| lint-js-%: | ||
| cd $(call make-path,$*) && pnpm install && pnpm lint $(ARGS) | ||
|
|
||
| test-js-%: |
There was a problem hiding this comment.
Ordering problem: the earlier patterns format-check- and test- match first, so they look for non-existent directories.
i.e.:
❯ make test-js-type-length-value-js
error: manifest path `js-type-length-value-js/Cargo.toml` does not exist
make: *** [test-js-type-length-value-js] Error 101
Solution:
- move
format-check-js-%andtest-js-%beforeformat-check-%andtest-%
Contributor
Author
There was a problem hiding this comment.
Ah interesting! That must be the mac issue that @samkim-crypto noticed -- this works fine on Linux. Will fixup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The libraries repo has a lot of packages to run CI and commands against, and contains a pretty long list of commands in package.json, so it's a great candidate for moving to a Makefile.
Summary of changes
This is pretty similar to the others, except that I removed the "first word before - means directory" and instead flatten everything at the top-level.